import { get, post, post_json } from '@/http/axios'
export default {
  namespaced: true,
  state: {
    // 栏目数据
    categoryData:[]
  },
  mutations: {
    SET_CATEGORYDATA(state, payload){
      state.categoryData = payload
    }
  },
  actions: {
    // 获取全部栏目的数据
    async getAllCategoryData({commit}, payload){
      let res = await get('/productCategory/pageQuery', payload)
      // console.log(res);
      commit('SET_CATEGORYDATA', res.data.data.list)
    }
  }
}